$file-prefix: 'common-loading2';

.#{$file-prefix}-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    overflow: hidden;
    animation-delay: 1s;

    .#{$file-prefix}-item {
        width: 20px;
        height: 20px;
        background: #f583a1;
        border-radius: 50%;
        background-color: #eed968;
        margin: 7px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

    $colors: (#eed968, #eed968, #eec368, #eead68, #ee8c68);

    @for $i from 1 through length($colors) {
        $item: nth($colors, $i);

        .#{$file-prefix}-item-#{$i}:before {
            content: '';
            width: 20px;
            height: 20px;
            border-radius: 50%;
            opacity: 0.7;
            animation: scale 2s infinite cubic-bezier(0, 0, 0.49, 1.02);
            animation-delay: 200ms * $i;
            background-color: $item;
        }
    }
}

@keyframes scale {
    0% {
        transform: scale(1);
    }

    50%,
    75% {
        transform: scale(2.5);
    }

    78%,
    100% {
        opacity: 0;
    }
}